<template>
    <div class="main">
        <div class="msgItem" v-for="item in noticeList" @click="godetails(item.id)">
            <div class="msgItem_tit">{{ item.title }}</div>
            <div class="msgItem_time"> {{ item.createTime }}</div>
        </div>
    </div>
</template>
<script>
import {
    getNoticeList
} from "@/api/api";
export default {
    data() {
        return {
            noticeList: [],
        }
    },
    created() {
        this.getNoticeList()
    },
    methods: {
        getNoticeList() {
            getNoticeList().then(res => {
                if (res.code == 200) {
                    this.noticeList = res.data
                }
            })
        },
        godetails(id) {
            this.$router.push({
                path: "/message_details", query: {
                    id, typeS: "gonggao"
                }
            })
        }
    },
}
</script>
<style scoped>
.main {
    background-color: #F4F8FC;
    padding-top: 0.75rem;
    min-height: calc(100vh - 0.75rem);
}

.msgItem {
    width: clac(100% - 4rem);
    padding: 0 1rem;
    margin: 0.75rem 1rem;
    margin-top: 0;
    height: 4.25rem;
    background: #FFFFFF;
    box-shadow: 0.00rem 0.00rem 0.56rem 0.00rem rgba(174, 206, 254, 0.3000);
    border-radius: 0.38rem;
    font-size: 1rem;
    display: flex;
    /* align-items: center; */
    justify-content: center;
    flex-flow: column;
}

.msgItem_tit {
    font-family: PingFang SC;
    font-weight: 500;
    color: #131A2A;
    line-height: 1.875rem;
    width: 100%;
    overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msgItem_time {
    font-size: 0.81rem;
    font-family: PingFang SC;
    font-weight: 500;
    color: #949FB4;
    line-height: 1.50rem;
}
</style>